<?php if (!defined('THINK_PATH')) exit(); /*a:4:{s:61:"C:\wamp200\www\xgwnew/application/index\view\index\frank.html";i:1537176255;s:61:"C:\wamp200\www\xgwnew/application/index\view\public\base.html";i:1536844932;s:62:"C:\wamp200\www\xgwnew/application/index\view\public\frank.html";i:1536152846;s:69:"C:\wamp200\www\xgwnew/application/index\view\public\previewimage.html";i:1536152846;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title><?php echo $title; ?></title>
<link rel="stylesheet" href="__PUBLIC__/xsd/css/mui.min.css">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/xsd/css/icons-extra.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/xsd/css/app.css?v1111121" />

</head>
<!--/head-->
<body>


	<!--/header-->

<script src="__PUBLIC__/js/jquery.js"></script>
<style>
    .mui-row.mui-fullscreen>[class*="mui-col-"] {
        height: 100%;
    }

    .mui-col-xs-3,
    .mui-col-xs-9 {
        overflow-y: auto;
        height: 100%;
    }

    .mui-segmented-control .mui-control-item {
        line-height: 50px;
        width: 100%;
    }


    .mui-segmented-control.mui-segmented-control-inverted .mui-control-item.mui-active {
        background-color: #fff;
    }
    .mui-toast-container {
        bottom: 50%;
    }
    .zcnav {
      left: 0px; right: 0px; top: 70px; z-index: 7;position: fixed; height:40px;line-height: 40px;
    }
    .zcnav a{
      font-size: 16px;
          color: #fff;
    }
    .zcnav span{
      font-size: 16px;
          margin-left: 10px;
              color: #525252;
    }
    .cnavcom{
      margin: 0;
      background-color:#3190e8;
      overflow: hidden;
    }
    .catnav{
         text-align: center;
         display: inline-block;
         width: 25%;
         height: 35px;
         float: left;
         line-height: 35px;
    }

    .catactive{
      color: #fff;
    border-bottom: 2px solid #fff;
    background: 0 0;
    }
    .foodprice::before {
      content: '';
    }

    .goods-action-mini-btn {
        color: #666;
        display: -webkit-box;
        display: -webkit-flex;
        display: flex;
        height: 50px;
        font-size: 10px;
        min-width: 15%;
        line-height: 1;
        text-align: center;
        background-color: #fff;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -webkit-flex-direction: column;
        flex-direction: column;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
    }
</style>
<div class="hdcom">
  <header class="mui-bar mui-bar-nav" style="z-index:7">

  			<h1 class="mui-title"><?php echo $title; ?></h1>
        <a class="mui-icon mui-icon-contact mui-pull-right" href="<?php echo url('index/user/index'); ?>"></a>
  </header>
  <div class="pref-info" style="left: 0px; right: 0px; top: 44px; z-index: 7;position: fixed;">
      <span class="pref-text"><?php echo get_table_field('6','id', 'content', 'Page'); ?></span>
  </div>

  <div class="zcnav">
   <div   class="cnavcom">
   				<div class="mui-card-content">
   					<div class="mui-card-content-inner" style="padding: 2px 0;overflow: hidden;">
               <!-- <?php if(empty(\think\Session::get('user.phone')) || (\think\Session::get('user.phone') instanceof \think\Collection && \think\Session::get('user.phone')->isEmpty())): ?>
               <a href="<?php echo url('index/user/info'); ?>">注册会员</a><span>(会员注册后享受会员特权)</span>
                <?php else: ?>
                <span style="color:#fff;  font-size: 14px;">hi 会员<?php echo \think\Session::get('user.name'); ?>您好,您的积分为<?php echo \think\Session::get('user.integral'); ?>,你有<?php echo getCouponNum(\think\Session::get('user.id')); ?>张优惠券!</span>
               <?php endif; ?> -->


               <?php if(is_array($Goodscatlist) || $Goodscatlist instanceof \think\Collection): $i = 0; $__LIST__ = $Goodscatlist;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
                 <a   href="<?php echo url('', ['cid'=>$vo['id']]); ?>" class=" catnav <?php if($vo['id'] == $cat_id): ?>catactive<?php endif; ?>"><?php echo $vo['cat_name']; ?></a>
               <?php endforeach; endif; else: echo "" ;endif; ?>

   					</div>
   				</div>
   	</div>
  </div>

</div>

<script>
  $(function(){
    var hei = $('header').height()+$('.pref-info').height()+$('.cnavcom').height();
    console.log(hei);
    if(hei>108){
      hei = hei+'px'
      $('.mui-content').css({'padding-top':hei})
    }
  })
</script>


<div class="mui-content mui-row " style="    padding-top: 108px;    padding-bottom: 50px;">



    <div class="subsc"   style="line-height:30px;display:none"><button type="button" name="button" class="mui-btn-warning">关注客服微信</button> <?php echo config('frankdec'); ?></div>


                  <dl>

                      <?php if(is_array($list) || $list instanceof \think\Collection): $i = 0; $__LIST__ = $list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;?>
                        <dd  data-ruleid="<?php echo $item['goodsrule'][0]['id']; ?>"  data-goodid="<?php echo $item['id']; ?>" style="padding-bottom: 0;">
                            <span class="foodimg" style="    flex: 7;"><img  src="<?php echo get_cover($item['cover_id'],'path','400x218'); ?>" style="height:120px;" data-preview-src="" data-preview-group="<?php echo $item['id']; ?>">

                              (点击图片放大缩小图片)
                            </span>
                            <section class="foodinfo" style="    padding: 0;"   >
                                <div onclick='javascript:window.location.href="<?php echo url('goods/frankdetail',['id'=>$item['id']]); ?>"' >
                                  <header class="foodtitle" ><span><?php echo $item['good_name']; if($item['is_timelimit'] == '1'): ?><span style="color:red">(限时团购)</span>
                                    <?php endif; ?></span>
                                  </header>
                                  <!-- <p class="mui-ellipsis fooddescription" style="margin:3px 0;">商家:<?php echo get_table_field($item['shop_id'],"id","shopname","goodshops"); ?></p> -->


                                  <p class="fooddescription"  style="margin:3px 0;font-weight: bold;color:red;">配送说明:

                                      <?php echo $item['deliverydec']; ?>

                                    </p>
                                    <?php if($item['is_timelimit'] == '1'): if(strtotime($item->startlimit) < intval(time()) && intval(time()) < strtotime($item->endlimit)): ?>
                                        <p class="fooddescription endlimit"   data-endtime = "<?php echo $item['endlimit']; ?>" data-starttime = "<?php echo $item['startlimit']; ?>"  style="margin:3px 0;font-weight: bold;"></p>
                                      <?php elseif(strtotime($item->startlimit) > intval(time())): ?>
                                      <p class="fooddescription  hidecartbtn" data-id="<?php echo $item['id']; ?>"   style="margin:3px 0;color:red">团购未开始：<?php echo $item['startlimit']; ?> —— <?php echo $item['endlimit']; ?></p>
                                      <?php else: ?>
                                      <p class="fooddescription  hidecartbtn" data-id="<?php echo $item['id']; ?>"  style="margin:3px 0;color:red">团购已结束：<?php echo $item['startlimit']; ?> —— <?php echo $item['endlimit']; ?></p>
                                      <?php endif; endif; ?>
                                    <p class="fooddescription"  style="    margin: 0 0 40px 0;color:#000;font-weight: bold;">特色描述:<?php echo $item['good_desc']; ?> <br />
                                      <!-- <?php if($item['goodsrule'][0]['quota'] != '0'): ?>
                                          限购：<?php echo $item['goodsrule'][0]['quota']; ?>份
                                      <?php endif; ?> -->

                                      <del style="color:#666;font-size:12px;font-weight: normal;">市场价格：¥<?php echo $item['goodsrule'][0]['market_price']; ?></del>
                                    </p>


                                  <?php 
                                     $priceArr = array();
                                     foreach($item['goodsrule'] as $data){
                                        $priceArr[]= $data['rule_price'];
                                     }
                                     $minPrice = min($priceArr);
                                     if(count($priceArr) > 1){
                                          $minPriceHtml = "<span>".$minPrice."</span><span class='foodprice-lowest'>起</span>";
                                     }else{
                                        $minPriceHtml = "<span>".$minPrice."</span>";
                                     }
                                   if(groupModel() > 0): ?>
                                     <strong class="foodprice" style="bottom: 10px;"><span style="color:#000;font-weight: normal;font-size:12px;">价格：</span> ¥<?php echo $minPriceHtml; ?>   </strong>
                                  <?php else: ?>
                                    <strong class="foodprice" style="bottom: 10px;"> <span style="color:#000;font-weight: normal;font-size:12px;">价格：</span> ¥<?php echo $minPriceHtml; ?> </strong>
                                  <?php endif; ?>


                                </div>
                                <div class="mask mask-transition" style="display:none;">
                                    <div class="wrap">
                                        <div class="container">
                                            <div class="specpanel">
                                                <h1><?php echo $item['good_name']; ?></h1>
                                                <div class="candidators">
                                                    <div class="candidators-group">
                                                        <h2>规格</h2>
                                                          <?php if(is_array($item['goodsrule']) || $item['goodsrule'] instanceof \think\Collection): $i = 0; $__LIST__ = $item['goodsrule'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$voo): $mod = ($i % 2 );++$i;?>
                                                            <a href="javascript:" class="candidator <?php if($i == '1'): ?>selected <?php endif; ?>" data-info="<?php echo $voo[rule_name]; ?>|<?php echo $voo[rule_price]; ?>|<?php echo $voo[stock]; ?>|<?php echo $voo[weight]; ?>" data-ruleid="<?php echo $voo[id]; ?>"><?php echo $voo[rule_name]; ?></a>
                                                          <?php endforeach; endif; else: echo "" ;endif; ?>
                                                    </div>
                                                    <div class="selectedresult">
                                                        <p class="selectedstr">已选：<?php echo $item['goodsrule'][0]['rule_name']; ?> <span class='stock'>库存：<?php echo $item['goodsrule'][0]['stock']; ?></span> <span class='weight'>重量：<?php echo $item['goodsrule'][0]['weight']; ?></span></p>
                                                        <p class="price"><span class="yen">¥</span> <span class="now"><?php echo $item['goodsrule'][0]['rule_price']; ?></span> </p>
                                                    </div>
                                                    <a href="javascript:" class="cartadd" data-id="<?php echo $item['id']; ?>" data-ruleid="<?php echo $item['goodsrule'][0]['id']; ?>" data-dismiss="cart" data-methods="addmore" >加入购物车</a>
                                                    <a href="javascript:" class="close"></a>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                              </div>
                                  <div class="cartbutton" style="    bottom: 5px;">
                                    <span>
                                      <span class="entitybutton">
                                        <?php echo getRulenumhtml($item['id']); if(count($item['goodsrule']) > 1): ?>
                                          <a href="javascript:" class="specadd cartbtn<?php echo $item['id']; ?>"  ><span class="entityspecbutton">选规格</span></a>
                                        <?php else: if($item['goodsrule'][0]['stock'] == '0'): ?>
                                                <a href="javascript:"  ><span class="entityspecbutton" style="background-color: #ce4747;">已售罄</span></a>
                                          <?php else: ?>
                                            <a href="javascript:" class="oneaddcart cartbtn<?php echo $item['id']; ?>" data-dismiss="cart" data-methods="addone" ><span class="mui-icon mui-icon-plus"></span></a>
                                            <?php if($item['is_pinkage'] == '1'): ?>
                                                <!-- <a href="<?php echo url('cart/pinkage', ['rule_id'=> $item['goodsrule'][0]['id']]); ?>"  ><span class="entityspecbutton" >包邮</span></a> -->
                                            <?php endif; endif; endif; ?>
                                      </span>
                                    </span>
                                </div>




                            </section>



                        </dd>

                      <?php endforeach; endif; else: echo "" ;endif; ?>
                  </dl>



      </div>



    </div>

    <div class="cartmask fold-transition" _v-fd8ba416="" style="display: none;"></div>
    <div class="cartbody fold-transition"  style=" display:none;">
        <div class="cartheader" ><span class="cartheader-text" >购物车</span> <a href="javascript:" class="cartheader-remove" ><span class="mui-icon mui-icon-trash"></span> <span >清空</span></a></div>
        <div class="cartbody-scroller" >
            <!-- <div class="piecewise-tips" ><b >阶梯配送费</b> 满70免配送费</div> -->
            <ul class="cartlist" >
            </ul>
            <script id="tpl" type="text/html">
            {{each  as value i}}
              <li class="entityrow" data-boxruleid="{{value.rule_id}}" data-boxgoodid="{{value.good_id}}"  >
                <span class="entityname" ><em class="name" >{{value.good_name}} {{value.rule_name}}</em></span>
                <span class="entitytotal" >{{value.good_price*value.num}}</span>
                <span  class="entitycartbutton">
                  <span class="entitybutton">
                    <a href="javascript:" data-dismiss="cart" data-methods="minusbox" data-cartid="{{value.id}}"  style="padding:0" ><span class="mui-icon mui-icon-minus"></span></a>
                    <span class="entityquantity">{{value.num}}</span>
                    <a href="javascript:" data-dismiss="cart" data-methods="addbox" style="padding:0" ><span class="mui-icon mui-icon-plus"></span></a>
                  </span>
                </span>
              </li>
            {{/each}}
            </script>
        </div>
    </div>
<div class="van-goods-action tgou" style="background-color:#fff;"><a class="van-hairline van-goods-action-mini-btn"  style="border-right: 1px #e5e5e5 solid;">
  <i class="mui-icon-extra mui-icon-extra-custom subsc" style="padding: 0;color: #666;font-size: 24px;"><!----></i>客服</a>
  <a class="van-hairline van-goods-action-mini-btn "  href="javascript:;" data-dismiss="cartpopup" attr-quantity="<?php echo $cart['num']; ?>"  >
    <i class="mui-icon mui-icon-extra mui-icon-extra-cart" style="    position: relative;" ><div class="van-icon__info"><?php echo $cart['num']; ?></div></i>
    购物车
  </a>
  <a class="van-hairline van-goods-action-mini-btn cartprice"  href="javascript:;" style="min-width: 40%;"  >
    <span class="carttotal" style="color:#666">¥<i><?php echo $cart['price']; ?></i></span> <span class="cartdelivery" ></span>
  </a>
  <?php if($cart['price'] > config('initialdeliveryprice')): ?><a href="javascript:;" data-url="<?php echo url('index/cart/frank'); ?>" class="submitbutton tgxd  " >去结算</a>
  <?php elseif($cart['price'] == 0): ?><a href="javascript:;" data-url="" class="submitbutton" ><?php echo config('initialdeliveryprice'); ?>起送</a>
  <?php else: ?> <a href="javascript:;" data-url="" class="submitbutton" >还差<?php echo abs($cart['price'] - config('initialdeliveryprice')); ?>元</a>
  <?php endif; ?>
</div>






<style>
.submitbutton{
  background-color: #f44;
  position:relative;
  width: 100%;
  height: 50px;
  line-height: 50px;
}

.van-goods-action {

    left: 0;
    right: 0;
    bottom: 0;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    position: fixed;
}
.van-goods-action-mini-btn {
    color: #666;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    height: 50px;
    font-size: 10px;
    min-width: 15%;
    line-height: 1;
    text-align: center;
    background-color: #fff;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
}
.van-button {
    position: relative;
    padding: 0;
    display: inline-block;
    height: 45px;
    line-height: 43px;
    border-radius: 3px;
    box-sizing: border-box;
    font-size: 16px;
    text-align: center;
    -webkit-appearance: none;
}
.van-goods-action-big-btn {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    padding: 0;
}
.van-goods-action-big-btn {
    -webkit-box-flex: 1;
    -webkit-flex: 1;
    flex: 1;
    padding: 0;
}

.van-button--bottom-action.van-button--primary {
    background-color: #f44;
}

[class*='van-hairline']::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    -webkit-transform: scale(.5);
    transform: scale(.5);
    -webkit-transform-origin: 0 0;
    transform-origin: 0 0;
    pointer-events: none;
    box-sizing: border-box;
    border: 0 solid #e5e5e5;
}


.van-button--bottom-action {
    width: 100%;
    height: 50px;
    line-height: 50px;
    border: 0;
    border-radius: 0;
    font-size: 16px;
    color: #fff;
    background-color: #f85;
}


.van-goods-action-mini-btn::after {
    border-width: 1px 0 0 1px;
}

.van-goods-action-mini-btn:first-child::after {
    border-left-width: 0;
}
.van-icon__info {
    color: #fff;
    left: 80%;
    top: -.5em;
    font-size: .5em;
    padding: 0 .3em;
    text-align: center;
    min-width: 1.2em;
    line-height: 1.2;
    position: absolute;
    border-radius: .6em;
    box-sizing: border-box;
    background-color: #f44;
    -webkit-transform: translateX(-50%);
    transform: translateX(-50%);
    font-family: PingFang SC, Helvetica Neue, Arial, sans-serif;
}


</style>


</div>




<!--/#footer-->

<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/xsd/js/mui.min.js"></script>
<script src="__PUBLIC__/xsd/js/flexible.js"></script>
<script src="__PUBLIC__/xsd/js/template.js"></script>

<script type="text/javascript">
  var addUrl = "<?php echo url('index/cart/add'); ?>",
      minusUrl = "<?php echo url('index/cart/minus'); ?>",
      clearUrl="<?php echo url('index/cart/clear'); ?>",
      cartListUrl ="<?php echo url('index/cart/getCartlist'); ?>";
</script>


<script src="__PUBLIC__/xsd/js/cart.js?v=1111111121111" charset="utf-8"></script>
<script>
  $(function(){
    $(document).on('click', '.tgxd' , function(){
      var url = $(this).attr('data-url'),num = parseInt($('[data-dismiss="cartpopup"]').attr('attr-quantity'))
      var subscribe = '<?php echo $subscribe; ?>';
      if(subscribe != 1){
        $.get("<?php echo url('index/getSubscribe'); ?>", function(data){
          if(data.value == 0){
            mui.alert('<img src="/public/images/qrcode_for_wx.jpg" style="width:100%;"><p style=" text-align: left;"><b>无法识别二维码</b><br />1、打开微信，点击‘添加朋友’<br />2、点击公众号<br />3、搜索公众号：贵阳鲜果屋<br />4、点击‘关注’，完成</p>', '请长按扫二维码关注公众号');
            return ;
          }else {
            if(num>0){
            window.location.href = "<?php echo url('index/cart/frank'); ?>"
            }else{
              mui.toast('请添加购买的商品！')
            }
          }
        })

      }else{
        if(num>0){
        window.location.href = "<?php echo url('index/cart/frank'); ?>"
        }else{
          mui.toast('请添加购买的商品！')
        }
      }
    })
  })

  $(function(){
    $('.pref-info').click(function(){
      var info=$(this).text()
      mui.alert(info, '公告', '关闭',function() {
      });
    })
  })

</script>

<style type="text/css">
  .mui-preview-image.mui-fullscreen {
    position: fixed;
    z-index: 20;
    background-color: #000;
  }

  .mui-preview-header,
  .mui-preview-footer {
    position: absolute;
    width: 100%;
    left: 0;
    z-index: 10;
  }

  .mui-preview-header {
    height: 44px;
    top: 0;
  }

  .mui-preview-footer {
    height: 50px;
    bottom: 0px;
  }

  .mui-preview-header .mui-preview-indicator {
    display: block;
    line-height: 25px;
    color: #fff;
    text-align: center;
    margin: 15px auto 4;
    width: 70px;
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    font-size: 16px;
  }

  .mui-preview-image {
    display: none;
    -webkit-animation-duration: 0.5s;
    animation-duration: 0.5s;
    -webkit-animation-fill-mode: both;
    animation-fill-mode: both;
  }

  .mui-preview-image.mui-preview-in {
    -webkit-animation-name: fadeIn;
    animation-name: fadeIn;
  }

  .mui-preview-image.mui-preview-out {
    background: none;
    -webkit-animation-name: fadeOut;
    animation-name: fadeOut;
  }

  .mui-preview-image.mui-preview-out .mui-preview-header,
  .mui-preview-image.mui-preview-out .mui-preview-footer {
    display: none;
  }

  .mui-zoom-scroller {
    position: absolute;
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    -webkit-backface-visibility: hidden;
  }

  .mui-zoom {
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
  }

  .mui-slider .mui-slider-group .mui-slider-item img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
  }

  .mui-android-4-1 .mui-slider .mui-slider-group .mui-slider-item img {
    width: 100%;
  }

  .mui-android-4-1 .mui-slider.mui-preview-image .mui-slider-group .mui-slider-item {
    display: inline-table;
  }

  .mui-android-4-1 .mui-slider.mui-preview-image .mui-zoom-scroller img {
    display: table-cell;
    vertical-align: middle;
  }

  .mui-preview-loading {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: none;
  }

  .mui-preview-loading.mui-active {
    display: block;
  }

  .mui-preview-loading .mui-spinner-white {
    position: absolute;
    top: 50%;
    left: 50%;
    margin-left: -25px;
    margin-top: -25px;
    height: 50px;
    width: 50px;
  }

  .mui-preview-image img.mui-transitioning {
    -webkit-transition: -webkit-transform 0.5s ease, opacity 0.5s ease;
    transition: transform 0.5s ease, opacity 0.5s ease;
  }

  @-webkit-keyframes fadeIn {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  @keyframes fadeIn {
    0% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }

  @-webkit-keyframes fadeOut {
    0% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  @keyframes fadeOut {
    0% {
      opacity: 1;
    }
    100% {
      opacity: 0;
    }
  }

  p img {
    max-width: 100%;
    height: auto;
  }
</style>
<script src="__PUBLIC__/xsd/js/mui.zoom.js"></script>
<script src="__PUBLIC__/xsd/js/mui.previewimage.js?v=21313123213321231132"></script>
<script>
  mui.previewImage();
</script>



<?php if(!(empty(config('shop_hours')) || (config('shop_hours') instanceof \think\Collection && config('shop_hours')->isEmpty()))): ?>
<script>
  var time_range = function (beginTime, endTime) {
    var strb = beginTime.split (":");
    if (strb.length != 2) {
      return false;
    }

    var stre = endTime.split (":");
    if (stre.length != 2) {
      return false;
    }

    var b = new Date ();
    var e = new Date ();
    var n = new Date ();

    b.setHours (strb[0]);
    b.setMinutes (strb[1]);
    e.setHours (stre[0]);
    e.setMinutes (stre[1]);

    if (n.getTime () - b.getTime () > 0 && n.getTime () - e.getTime () < 0) {
      return true;
    } else {

      mui.alert("<?php echo config('shop_hours_message'); ?>", '公告');
      $('.mui-popup-buttons').html(' ')
      $('.mui-popup-inner').css('border-radius', '13px')
      return false;
    }
  }

  var shop_hours = "<?php echo config('shop_hours'); ?>";
  var hours_arr = shop_hours.split('-');
  time_range (hours_arr[0], hours_arr[1]);

</script>
<?php endif; if(config('is_rest') == '1'): ?>
<script>
mui.alert("<?php echo config('rest_message'); ?>", '公告');
$('.mui-popup-buttons').html(' ')
$('.mui-popup-inner').css('border-radius', '13px')
</script>
<?php endif; ?>



<script>
  $(function(){
    $('.subsc').click(function(){
      // $.get("<?php echo url('index/clearusersession'); ?>", function(data){
      //   if(data.code == 1){
      //     window.location.href = "http://mp.weixin.qq.com/s/-AzpDTU7eAD24-R5QUP0wg"
      //   }
      // })
      //cookie('goodsmodel_id', $model_id);
      <?php switch(cookie('goodsmodel_id')): case "1":case "2":case "21":case "22":case "3": ?>
            mui.alert("<img src=<?php echo get_cover(config('frankserviceimg'), 'path'); ?> style='width:100%;'>", '长按扫二维码');
        <?php break; endswitch; if(!(empty($contact_qc) || ($contact_qc instanceof \think\Collection && $contact_qc->isEmpty()))): ?>
            mui.alert('<img src="<?php echo $contact_qc; ?>" style="width:100%;">', '长按扫二维码');
      <?php endif; ?>
    })


    $('.endlimit').each(function(){
      var $this = $(this);
      var stime = $this.attr('data-endtime');
      var starttime = new Date(stime.replace(/-/g,"/"))
      setInterval(function () {
        var nowtime = new Date();
        var time = starttime - nowtime;
        if(time > 0){
          var day = parseInt(time / 1000 / 60 / 60 / 24);
          var hour = parseInt(time / 1000 / 60 / 60 % 24);
          var minute = parseInt(time / 1000 / 60 % 60);
          var seconds = parseInt(time / 1000 % 60);
          $this.html("距结束还有:<span style='color:red'>"+ day + "天" + hour + "小时" + minute + "分钟" + seconds + "秒</span>");
        }

      }, 1000);
    })

    $('.hidecartbtn').each(function(){
      var id = $(this).attr('data-id')
      $('.cartbtn'+id).hide();
    })


  })
</script>

 

 <!-- <?php if(empty(\think\Cookie::get('positioninit')) || (\think\Cookie::get('positioninit') instanceof \think\Collection && \think\Cookie::get('positioninit')->isEmpty())): ?>
 <script type="text/javascript" src="https://3gimg.qq.com/lightmap/components/geolocation/geolocation.min.js"></script>
 <script>
   $(function(){
    var geolocation = new qq.maps.Geolocation("QQ6BZ-24HC6-ZAXSZ-MTZAU-5MU2J-HEFEH", "鲜果屋");
     geolocation.getIpLocation(showPosition, showErr)

   })

   function showPosition(position) {
     console.log(1111);
     $.getJSON("<?php echo url('index/cart/changecookie'); ?>", {name: 'positioninit', 'val': position.lat+','+position.lng}, function(json, textStatus) {});
  };
   function showErr() {
     console.log('定位失败');
   };
 </script>
 <?php endif; ?> -->

</body>
</html>
